package com.sdry.product.sorting.controller;

import com.sdry.common.BaseController;
import com.sdry.common.TableDataInfo;
import com.sdry.product.sorting.entity.SortReceivingDetail;
import com.sdry.product.sorting.service.SortReceivingDetailService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

/**
 * @program: info_sdry
 * @description: 入库详细下表
 * @author: cb
 * @create: 2020-02-28 13:47
 **/
@Controller
@RequestMapping(value = "sortReceivingDetail")
public class SortReceivingDetailController extends BaseController {

    @Resource
    private SortReceivingDetailService sortReceivingDetailService;

    /**
     * 查询分页
     * @param sortReceivingDetail 收货详细实体
     * @return TableDataInfo
     */
    @RequestMapping(value = "queryWarehousingDetailPage")
    @ResponseBody
    public TableDataInfo queryWarehousingDetailPage(SortReceivingDetail sortReceivingDetail) {
        List<SortReceivingDetail> sortReceivingDetailList = sortReceivingDetailService.queryWarehousingDetailPage(sortReceivingDetail);
        Long total = sortReceivingDetailService.queryWarehousingDetailTotal(sortReceivingDetail);
        return getDataTable(sortReceivingDetailList,total);
    }
}
